import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by dell on 2017/8/7.
 */
public class KeyInTest {
    public static void main(String[] args) throws IOException {
        try (
                InputStreamReader isr = new InputStreamReader(System.in);
                BufferedReader bf = new BufferedReader(isr)) {
            String line = null;
            while ((line = bf.readLine()) != null) {
                if (line.equals("exit")) {
                    System.exit(1);
                }
                // System.out.println("输出内容："+line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
